/*
 * urlCollection.h
 *
 *  Created on: Apr 26, 2011
 *      Author: xrose
 */

#ifndef URLCOLLECTION_H_
#define URLCOLLECTION_H_
#include <string>
#include <iostream>
#include "incdefault.h"
using namespace std;

class URLCollection{
public:
	URLCollection();
	URLCollection(int cap);
	URLCollection(const URLCollection &url);
	virtual ~URLCollection();
	//--
	/**
	 * method: put()
	 * put a url to the collection avoid to repeate download
	 */
	void put(string url);
	/**
	 * get an url from index pos
	 */
	char* get(int pos);
	int getsize();
private:
	bool isUrlExist(string url);
	char **_rec; //array of url, that are to download
	int _size;
	int _cap;
};

#endif /* URLCOLLECTION_H_ */
